package APong.States;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.BasicGameState;
import org.newdawn.slick.state.StateBasedGame;

import APong.World.World;

public class GamePlayState extends BasicGameState{

	private int stateId = -1;
	
	public World world = new World();
	
	public GamePlayState(int id){
		this.stateId = id;
	}
	@Override
	public void init(GameContainer gc, StateBasedGame sbg)
			throws SlickException {
		world.init(gc);
		
	}

	@Override
	public void render(GameContainer gc, StateBasedGame sbg, Graphics g)
			throws SlickException {
		world.render(gc, g);
		
	}

	@Override
	public void update(GameContainer gc, StateBasedGame sbg, int delta)
			throws SlickException {
		world.update(gc, sbg, delta);
		
	}

	@Override
	public int getID() {
		return stateId;
	}

}
